package cmdbregistrationcenter

import (
	"dfx_cmdb/models"

	"gorm.io/datatypes"
)

type CMDBRegistrationCenterHost struct {
	models.Models
	Hostname          string         `gorm:"type:varchar(255)"`
	Internalip        string         `gorm:"type:varchar(50)"`
	Externalip        string         `gorm:"type:varchar(50)"`
	AgentAppStatus    datatypes.JSON `gorm:"type:json"`
	Cpu               int64          `gorm:"type:bigint"`
	Memory            int64          `gorm:"type:bigint"`
	SystemDisk        int64          `gorm:"type:bigint"`
	DataDisk          datatypes.JSON `gorm:"type:json"`
	AppInstellsStatus datatypes.JSON `gorm:"type:json"`
	Platform          string         `gorm:"type:varchar(100)"`
}

func (h *CMDBRegistrationCenterHost) TableName() string {
	return "cmdb_registration_center_host"
}

type OtherRegistrationCenterHost struct {
	models.Models
	OtherAppName string `gorm:"type:varchar(255)"`
	AppAddress   string `gorm:"type:varchar(50)"`
	AppStatus    bool   `gorm:"type:json"`
}

func (h *OtherRegistrationCenterHost) TableName() string {
	return "cmdb_other_registration_center_host"
}
